```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@Qualifier注解解析 - Spring依赖注入的精准控制</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f8fafc;
            color: #1e293b;
        }
        .hero {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        .code-block {
            background-color: #1e293b;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        .feature-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        }
        .divider {
            position: relative;
            height: 1px;
            background-color: #e2e8f0;
        }
        .divider:after {
            content: "";
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 3px;
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            border-radius: 3px;
        }
    </style>
</head>
<body class="antialiased">
    <!-- Hero Section -->
    <section class="hero text-white py-20 md:py-32 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-4 leading-tight">
                <span class="inline-block px-2 py-1 bg-white bg-opacity-20 rounded-lg">@Qualifier</span> 注解
            </h1>
            <p class="text-xl md:text-2xl font-light mb-8 max-w-3xl mx-auto">
                Spring依赖注入的精准控制工具
            </p>
            <p class="text-lg md:text-xl opacity-90 max-w-2xl mx-auto">
                解决Bean注入冲突，实现精确的依赖管理
            </p>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 md:px-0 py-12">
        <!-- Introduction Section -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 md:p-8">
                <h2 class="text-2xl md:text-3xl font-bold text-gray-800 mb-4">什么是@Qualifier注解？</h2>
                <p class="text-gray-700 leading-relaxed mb-6">
                    @Qualifier 注解是用于解决 Spring 中 Bean 注入冲突的重要工具。它通过明确指定 Bean 的名称来确保正确的 Bean 被注入，从而解决了在容器中存在多个相同类型 Bean 时的歧义问题。通过 @Qualifier，开发者可以灵活地控制 Bean 的注入，实现更精确的依赖管理。
                </p>
                <div class="divider my-8"></div>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="card bg-white p-6 rounded-lg border border-gray-100">
                        <div class="feature-icon rounded-full flex items-center justify-center text-white mb-4 mx-auto">
                            <i class="fas fa-code text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold text-gray-800 mb-3 text-center">解决Bean冲突</h3>
                        <p class="text-gray-600 text-center">当容器中有多个Bean实现了相同的接口或继承自相同的类时，@Qualifier注解帮助Spring选择具体的Bean实例。</p>
                    </div>
                    <div class="card bg-white p-6 rounded-lg border border-gray-100">
                        <div class="feature-icon rounded-full flex items-center justify-center text-white mb-4 mx-auto">
                            <i class="fas fa-bullseye text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold text-gray-800 mb-3 text-center">指定注入的Bean</h3>
                        <p class="text-gray-600 text-center">通过@Qualifier指定一个Bean的名称，使得Spring在自动注入时能够明确注入哪个Bean。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Usage Section -->
        <section class="mb-16">
            <h2 class="text-2xl md:text-3xl font-bold text-gray-800 mb-8 text-center">@Qualifier的使用方法</h2>
            
            <!-- Field Injection -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-10">
                <div class="p-6 md:p-8 bg-gradient-to-r from-indigo-50 to-purple-50">
                    <div class="flex items-center mb-4">
                        <div class="w-8 h-8 bg-indigo-500 rounded-full flex items-center justify-center text-white mr-3">
                            1
                        </div>
                        <h3 class="text-xl font-semibold text-gray-800">在字段注入中使用 @Qualifier</h3>
                    </div>
                    <p class="text-gray-700 mb-6">
                        在字段注入中，@Qualifier 与 @Autowired 一起使用，用于指定注入的 Bean 名称。
                    </p>
                    <div class="code-block p-4 rounded-lg mb-4">
                        <pre class="text-gray-300 overflow-x-auto">
<code class="language-java">@Service
public class MyService {
    private final MyRepository myRepository;

    @Autowired
    public MyService(@Qualifier("specificRepository") MyRepository myRepository) {
        this.myRepository = myRepository;
    }
}</code></pre>
                    </div>
                    <div class="flex items-center text-sm text-indigo-600">
                        <i class="fas fa-info-circle mr-2"></i>
                        <p>在这个例子中，@Qualifier("specificRepository") 指定了注入名为 specificRepository 的 MyRepository 实例。</p>
                    </div>
                </div>
            </div>
            
            <!-- Method Parameter Injection -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-10">
                <div class="p-6 md:p-8 bg-gradient-to-r from-purple-50 to-indigo-50">
                    <div class="flex items-center mb-4">
                        <div class="w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center text-white mr-3">
                            2
                        </div>
                        <h3 class="text-xl font-semibold text-gray-800">在方法参数注入中使用 @Qualifier</h3>
                    </div>
                    <p class="text-gray-700 mb-6">
                        在方法参数注入中，@Qualifier 用于明确指定要注入的 Bean。
                    </p>
                    <div class="code-block p-4 rounded-lg mb-4">
                        <pre class="text-gray-300 overflow-x-auto">
<code class="language-java">@Service
public class MyService {
    private final MyRepository myRepository;

    @Autowired
    public void setMyRepository(@Qualifier("specificRepository") MyRepository myRepository) {
        this.myRepository = myRepository;
    }
}</code></pre>
                    </div>
                    <div class="flex items-center text-sm text-purple-600">
                        <i class="fas fa-info-circle mr-2"></i>
                        <p>在这个例子中，@Qualifier("specificRepository") 确保了注入名为 specificRepository 的 MyRepository 实例。</p>
                    </div>
                </div>
            </div>
            
            <!-- Constructor Injection -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="p-6 md:p-8 bg-gradient-to-r from-indigo-50 to-purple-50">
                    <div class="flex items-center mb-4">
                        <div class="w-8 h-8 bg-indigo-500 rounded-full flex items-center justify-center text-white mr-3">
                            3
                        </div>
                        <h3 class="text-xl font-semibold text-gray-800">在构造函数注入中使用 @Qualifier</h3>
                    </div>
                    <p class="text-gray-700 mb-6">
                        在构造函数注入中，@Qualifier 用于在多个构造函数参数中指定要注入的 Bean。
                    </p>
                    <div class="code-block p-4 rounded-lg mb-4">
                        <pre class="text-gray-300 overflow-x-auto">
<code class="language-java">@Service
public class MyService {
    private final MyRepository myRepository;

    @Autowired
    public MyService(@Qualifier("specificRepository") MyRepository myRepository) {
        this.myRepository = myRepository;
    }
}</code></pre>
                    </div>
                    <div class="flex items-center text-sm text-indigo-600">
                        <i class="fas fa-info-circle mr-2"></i>
                        <p>在这个例子中，@Qualifier("specificRepository") 确保了注入名为 specificRepository 的 MyRepository 实例。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Visualization Section -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 md:p-8">
                <h2 class="text-2xl md:text-3xl font-bold text-gray-800 mb-6 text-center">@Qualifier 工作机制图解</h2>
                <div class="mermaid">
                    graph TD
                        A[Spring容器] --> B[MyRepository接口]
                        B --> C[RepositoryImplA]
                        B --> D[RepositoryImplB]
                        E[MyService] -->|@Autowired + @Qualifier("RepositoryImplA")| C
                        style A fill:#f0f9ff,stroke:#1e3a8a
                        style B fill:#e0f2fe,stroke:#0369a1
                        style C fill:#ecfdf5,stroke:#059669
                        style D fill:#ecfdf5,stroke:#059669
                        style E fill:#fef2f2,stroke:#b91c1c
                </div>
                <div class="mt-6 text-gray-600">
                    <p>上图展示了@Qualifier注解在Spring DI容器中的工作流程：</p>
                    <ul class="list-disc pl-5 space-y-2 mt-2">
                        <li>Spring容器管理多个实现了MyRepository接口的Bean</li>
                        <li>当MyService需要注入MyRepository时，使用@Qualifier指定具体实现</li>
                        <li>Spring会根据@Qualifier的值找到匹配的Bean进行注入</li>
                    </ul>
                </div>
            </div>
        </section>

        <!-- Best Practices Section -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 md:p-8">
                <h2 class="text-2xl md:text-3xl font-bold text-gray-800 mb-6">最佳实践</h2>
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                            <i class="fas fa-check-circle text-green-500 mr-2"></i> 命名规范
                        </h3>
                        <p class="text-gray-700 mb-4">
                            为Bean定义有意义的名称，避免使用模糊的名称如"bean1"、"serviceA"等。好的名称应该反映Bean的具体实现或用途。
                        </p>
                        <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
                            <p class="text-sm text-gray-600 font-mono">// 好的示例</p>
                            <p class="text-sm text-gray-800 font-mono">@Repository("userJdbcRepository")</p>
                            <p class="text-sm text-gray-800 font-mono">@Repository("userJpaRepository")</p>
                        </div>
                    </div>
                    <div>
                        <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                            <i class="fas fa-check-circle text-green-500 mr-2"></i> 组合使用
                        </h3>
                        <p class="text-gray-700 mb-4">
                            @Qualifier可以与@Primary、@Conditional等注解组合使用，实现更复杂的依赖注入逻辑。
                        </p>
                        <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
                            <p class="text-sm text-gray-600 font-mono">// 组合使用示例</p>
                            <p class="text-sm text-gray-800 font-mono">@Autowired</p>
                            <p class="text-sm text-gray-800 font-mono">@Qualifier("prodDataSource")</p>
                            <p class="text-sm text-gray-800 font-mono">private DataSource dataSource;</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-10">
        <div class="container mx-auto max-w-5xl px-4 md:px-0">
            <div class="flex flex-col items-center">
                <div class="text-lg font-medium mb-2">技术小馆</div>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-300 hover:text-white transition-colors duration-200" target="_blank">
                    <i class="fas fa-globe mr-1"></i> http://www.yuque.com/jtostring
                </a>
            </div>
        </div>
    </footer>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize Mermaid
            mermaid.initialize({
                startOnLoad: true,
                theme: 'default',
                flowchart: {
                    useMaxWidth: true,
                    htmlLabels: true,
                    curve: 'basis'
                },
                themeVariables: {
                    primaryColor: '#E5E7EB',
                    primaryBorderColor: '#1E293B',
                    primaryTextColor: '#1E293B',
                    lineColor: '#1E293B'
                }
            });
            
            // Add smooth scrolling to all links
            document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                anchor.addEventListener('click', function (e) {
                    e.preventDefault();
                    document.querySelector(this.getAttribute('href')).scrollIntoView({
                        behavior: 'smooth'
                    });
                });
            });
        });
    </script>
</body>
</html>
```